<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<jsp:include page="inc.jsp"></jsp:include>    
<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>信息管理系统</title> 
    <link href="${ctx }/css/base.css" rel="stylesheet">
    <link href="${ctx }/css/login/login.css" rel="stylesheet">

</head> 
<body>
	<div class="login-hd">
		<div class="left-bg"></div>
		<div class="right-bg"></div>
		<div class="hd-inner">
			<span class="logo"></span>
			<span class="split"></span>
			<span class="sys-name">数字教育教务平台</span>
		</div>
	</div>
	<div class="login-bd">
		<div class="bd-inner">
			<div class="inner-wrap">
				<div class="lg-zone">
					<div class="lg-box">
						<div class="lg-label"><h4>用户登录</h4></div>
						<div class="alert alert-error">
			              <i class="iconfont">&#xe62e;</i>
			              <span>请输入用户名</span>
			            </div>
						<form id="loginForm">
							<div class="lg-username input-item clearfix">
								<i class="iconfont">&#xe60d;</i>
								<input name="loginName" type="text" placeholder="账号/邮箱">
							</div>
							<div class="lg-password input-item clearfix">
								<i class="iconfont">&#xe634;</i>
								<input name="password" type="password" placeholder="请输入密码">
							</div>
							<div class="lg-check clearfix">
								<div class="input-item">
									<i class="iconfont">&#xe633;</i>
									<input name="code" type="text" placeholder="验证码">
								</div>
								<span class="check-code" style="cursor: pointer;">
									<img onclick="reloadImg()" title="验证码" src="/EduSystem/code.jsp" style="width: 115px;height: 42px;">
								</span>
							</div>
							<div class="tips clearfix">
								<label><input type="checkbox" checked="checked">记住用户名</label>
								<a href="javascript:;" class="register">立即注册</a>
								<a href="javascript:;" class="forget-pwd">忘记密码？</a>
							</div>
							<div class="enter">
								<a href="javascript:;" class="purchaser" onClick="adminToLogin()">管理员登录</a>
								<a href="javascript:;" class="supplier" onClick="">老师/学生登录</a>
							</div>
						</form>
					</div>
				</div>
				<div class="lg-poster"></div>
			</div>
		</div>
	</div>
	<div class="login-ft">
		<div class="ft-inner">
			<div class="about-us">
				<a href="javascript:;">关于我们</a>
				<a href="javascript:;">法律声明</a>
				<a href="javascript:;">服务条款</a>
				<a href="javascript:;">联系方式</a>
			</div>
			<div class="address">地址：&nbsp;版权所有</div>
			<div class="other-info">建议使用IE8及以上版本浏览器&nbsp;</div>
		</div>
	</div>
</body> 
</html>
    
<script type="text/javascript">
	function adminToLogin(){
		var f = $('#loginForm');
		var data = f.serialize();
		var url = '${ctx}/user/toLogin';
		var result = submitData(url,data);
		if(result.sus){
			window.location.href = '${ctx}/sys/main';
		}else{
			$.messager.alert('系统提示',result.msg,'info');
			reloadImg();
		}
	}
	
	function reloadImg(){
		$(".check-code img")[0].src = "${ctx}/code.jsp?"+new Date().getTime().toString();
	}
</script>
    
    
    
    
    
    
    